<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<title>发放优惠券</title>
<%@ include file="/page/include.jsp"%>
<script src="<%=basePath%>/statics/js/webform.js" type="text/javascript"></script>
</head>
<link rel="stylesheet" type="text/css"
	href="${rootPath}/statics/plugins/zTree/css/zTreeStyle/zTreeStyle.css" />
<style type="text/css">
.error {
	color: red;
	padding-left: 10px;
}
</style>
<body class="nav-md" style="background-color: #f7f7f7">
	<div class="container body">
		<div class="main_container">
			<div class="framebody" style="min-height: 100%;" role="main">
				<div class="">
					<div class="clearfix"></div>
					<div class="row">
						<div class="col-md-12 col-sm-12 col-xs-12">
							<div class="x_panel">
								<div class="x_title">
									<h2>
										<i class="fa fa-pencil fa-fw"></i><strong>发放优惠券</strong> <small></small>
									</h2>
									<div class="clearfix"></div>
								</div>

								<div class="x_content">
									<form class="form-horizontal form-label-left" novalidate
										id="providUserCouponForm" method="post"
										action="${pageContext.request.contextPath}/coupon/providCoupon">
										<input id="counponId" name="counponId" value="${counpon.id }" type="hidden"/>
										<input id="timeType" name="timeType" value="${counpon.timeType }" type="hidden"/>
										<input id="userCodes" name="userCodes" value="" type="hidden"/>
										<input type="hidden"  id="propertyIds" name="propertyIds" />
										<input id="limitNumber" value="${counpon.limitNumber }" type="hidden"/>
										<div class="item form-group">
											<label class="control-label col-md-1 col-sm-1 col-xs-2" for="couponName">优惠券名称 : </label>
											<div class="col-md-3 col-sm-3 col-xs-4">
												<input id="couponName" name="couponName"
													value="${counpon.couponName }"
													class="form-control col-md-2 col-xs-12" type="text" readonly="readonly">
											</div>
										</div>
										<div class="item form-group">
											<label class="control-label col-md-1 col-sm-1 col-xs-2" for="getTime">领用时间: </label>
											<div class="col-md-3 col-sm-3 col-xs-4">
												<input id="getTime" name="getTime"
													value="<fmt:formatDate value='${counpon.beginGetTime }' pattern="yyyy-MM-dd HH:mm:ss"/> - <fmt:formatDate value='${counpon.endGetTime }' pattern="yyyy-MM-dd HH:mm:ss"/>"
													class="form-control col-md-2 col-xs-4" type="text" readonly="readonly">
											</div>
											<label class="control-label col-md-1 col-sm-1 col-xs-2" for="roleName">有效使用期限: </label>
											<div class="col-md-3 col-sm-3 col-xs-4">
												<c:if test="${counpon.timeType eq 1 }">
													<input id="time" name="time"
														value="<fmt:formatDate value='${counpon.beginTime }' pattern="yyyy-MM-dd HH:mm:ss"/> - <fmt:formatDate value='${counpon.endTime }' pattern="yyyy-MM-dd HH:mm:ss"/>"
														class="form-control col-md-3 col-xs-4" type="text" readonly="readonly">
												</c:if>
												<c:if test="${counpon.timeType eq 2 }">
													<input id="time" name="time"
														value="${counpon.limitDay }天"
														class="form-control col-md-3 col-xs-4" type="text" readonly="readonly">
												</c:if>
											</div>
										</div>
										<div class="x_title">
											<h2>
												<i class="fa fa-reorder fa-fw"></i>待发放列表 <small></small>
											</h2>
											<div class="clearfix">
                                    		</div>
                                		</div>
										<div class="row" style="padding-bottom: 10px;">
											<a class="btn btn-success btn-sm"  id="btnAddUser" href="javascript:void(0);">添加发放用户</a>
										</div>
										<div class="row">
											<table id="preProvidUserTable" class="table"></table>
										</div>
										<div class="x_title">
											<h2>
												<i class="fa fa-reorder fa-fw"></i>已发放列表 <small></small>
											</h2>
											<div class="clearfix">
                                    		</div>
                                		</div>
										<div class="row">
											<table id="providUserTable" class="table"></table>
										</div>
										<div class="ln_solid"></div>
										<div class="form-btn-content">
											<input type="hidden" value="true" id="submitCheck">
											<a id="btn_save_provid_coupon" class="btn btn-primary">确认发放</a>
											<a id="btn_back" class="btn btn-default">返回</a> 
										</div>
									</form>
								</div>
							</div>
						</div>
					</div>
				</div>
			</div>
		</div>
	</div>
</body>
<script type="text/javascript"
	src="${rootPath}/js/coupon/providCoupon_form.js?v=20171227"></script>
</html>